package com.luo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Results {
    private Integer code;
    private String msg;
    private Object data;

    public static Results success(String msg) {
        return new Results(200, "success", null);
    }

    public static Results success(Object data) {
        return new Results(200, "success", data);
    }

    public static Results error(String msg) {
        return new Results(500, msg, null);
    }


}
